package com.lch.designpattern.factory.factorymethod;

/**
 * @author: liuchenhui
 * @create: 2019-04-14 20:04
 **/
public class CarFactoryTest {
    public static void main(String[] args) {
        CarFactory carFactory = new BenzCarFactory();
        carFactory.createCar().driveCar();

        carFactory = new BMWCarFactory();
        carFactory.createCar().driveCar();
    }
}